package Igraf;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;


import javax.swing.AbstractButton;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JTextField;
import java.awt.SystemColor;
import java.awt.Font;
import javax.swing.SwingConstants;
import javax.swing.border.Border;

import com.jgoodies.forms.factories.Borders;
import javax.swing.border.LineBorder;

public class TailerKudeaketa extends JPanel {
	private static final long serialVersionUID = 1046533162431632882L;

	private JLabel telefonoa;
	private JLabel izena;

	private JTextField ize;
	private JTextField tele;

	private ButtonGroup baiez;
	private JRadioButton bai;
	private JRadioButton ez;

	private AbstractButton ezeztatu;

	private JComponent ok;

	public TailerKudeaketa() {

		this.setBackground(SystemColor.activeCaption);
		setLayout(new BorderLayout());
		
		//Erdiko panelak
		JPanel erdikoa = new JPanel();
		erdikoa.setBackground(SystemColor.activeCaption);		
		add(erdikoa, BorderLayout.CENTER);
		erdikoa.setLayout(new GridLayout(5,1));
		
		JPanel ge=new JPanel();
		ge.setBackground(SystemColor.activeCaption);
		erdikoa.add(ge);
		
		JPanel arri = new JPanel();
		arri.setBackground(SystemColor.activeCaption);
		FlowLayout fl_arri = new FlowLayout();
		fl_arri.setHgap(15);
		fl_arri.setVgap(10);
		arri.setLayout(fl_arri);
		izena=new JLabel("Tailer Izena:");
		izena.setFont(new Font("Arial", Font.PLAIN, 14));
		ize=new JTextField(18);
		arri.add(izena);
		arri.add(ize);
		erdikoa.add(arri);
		
		JPanel arrib = new JPanel();
		arrib.setBackground(SystemColor.activeCaption);
		FlowLayout fl_carri = new FlowLayout();
		fl_carri.setHgap(15);
		fl_carri.setVgap(10);
		arrib.setLayout(fl_carri);
		telefonoa=new JLabel("Telefonoa:");
		telefonoa.setFont(new Font("Arial", Font.PLAIN, 14));
		tele=new JTextField(18);
		arrib.add(telefonoa);
		arrib.add(tele);
		erdikoa.add(arrib);
		
		JPanel gee=new JPanel();
		gee.setBackground(SystemColor.activeCaption);
		erdikoa.add(gee);
		
		JPanel xx = new JPanel();
		xx.setBackground(SystemColor.activeCaption);
		FlowLayout fl = new FlowLayout();
		fl.setHgap(0);
		xx.setLayout(fl);
		bai=new JRadioButton("Propioa:");
		bai.setFont(new Font("Arial", Font.PLAIN, 14));
		ez=new JRadioButton("Propioa:");
		ez.setFont(new Font("Arial", Font.PLAIN, 14));
		baiez= new ButtonGroup();
		baiez.add(bai);
		baiez.add(ez);
		xx.add(bai);
		xx.add(ez);
		erdikoa.add(xx);
		
		//beheko panelak
		JPanel behekoa = new JPanel();
		FlowLayout flowLayout = (FlowLayout) behekoa.getLayout();
		flowLayout.setVgap(15);
		flowLayout.setHgap(110);
		behekoa.setBackground(SystemColor.activeCaption);
		ok = new JButton("Aldaketak ezarri");
		((AbstractButton) ok).setHorizontalAlignment(SwingConstants.LEFT);
		ok.setFont(new Font("Arial", Font.PLAIN, 14));
		behekoa.add(ok);
		ezeztatu = new JButton("Ezeztatu");
		ezeztatu.setHorizontalAlignment(SwingConstants.RIGHT);
		ezeztatu.setFont(new Font("Arial", Font.PLAIN, 14));
		behekoa.add(ezeztatu);
		add(behekoa, BorderLayout.SOUTH);
		
		
	}

	public static void main(String[] args) {
		TailerKudeaketa panela = new TailerKudeaketa();
		panela.setVisible(true);

		

	}
}